import {http, postRequest} from "~/composables/http";


type Res<T> = Promise<ItypeAPI<T>>
interface ItypeAPI<T> {
	code: number //返回后端自定义的200，404，500这种状态码
	data: T //请求的数据，用泛型
	msg: string | null // 返回状态码的信息，如请求成功等
}

export  class ProductService {
	static  async getProductInfo(data:any){
		return http.post('/api/admin/product/infoProductAdmin', data)
	}

	static  async delProductDoc(data:any){
		return http.post('/api/admin/product/delProductDoc', data)
	}
}





// // post请求
// export const getProductInfo = (data: any): Promise<AxiosResponse<any>> =>
// 	postRequest('/api/admin/product/infoProductAdmin', data);
